package com.chuantou.yuba.db.columns;

import java.util.HashMap;
import java.util.Map;

import android.net.Uri;

import com.chuantou.yuba.provider.DatabaseProvider;

/**
 * 缓存表结构
 * 
 * @author dl1001
 * 
 */
public class CacheColumns extends DataBaseColumns {
	public static final String TABLE_NAME = "CACHE";
	public static final Uri CONTENT_URI = Uri.parse("content://" + DatabaseProvider.AUTHORITY + "/" + TABLE_NAME);
	private static final HashMap<String, String> TABLE_CREATOR = new HashMap<String, String>();
	public static final String COLUMNS_CACHE_KEY = "KEY";
	public static final String COLUMNS_DATA = "DATA";
	public static final String COLUMNS_TIME = "TIME";

	@Override
	public String getTableName() {
		return TABLE_NAME;
	}

	@Override
	protected Map<String, String> getTableMap() {
		TABLE_CREATOR.put(COLUMNS_CACHE_KEY, "varchar(300) primary key");
		TABLE_CREATOR.put(COLUMNS_DATA, "blob");
		TABLE_CREATOR.put(COLUMNS_TIME, "Long");
		return TABLE_CREATOR;
	}

}
